#include <stdio.h>
#include <cstdlib>
#include <iostream>
#include "array_aux.h"
void selection_sort(vector<int>& array)
{
     for (int j = 1; j <= array.size()-1; j++)
     {
         int  min = j;
         for ( int i = j; i <= array.size() -1; i++)
         {
             if (array[min] > array[i])
             {
                min = i;
             }
         }
         int temp = array[j] ;
         array[j] = array[min];
         array[min] = temp;
     }
}

int main(int argc, char *argv[])
{
  vector<int>array = get_array(10);
  display_array(array);
  selection_sort(array);
  display_array(array);
  system("PAUSE");
  return 0;
}
